/*
 * floatingGen.h
 *
 *  Created on: 14.10.2012
 *      Author: OrGeJs
 */

#ifndef FLOATINGGEN_H_
#define FLOATINGGEN_H_

#include <stdint.h>
#include <float.h>
#include <stdbool.h>

struct flPointNumSingle {

	uint8_t base;
	uint8_t mantissaLenght;
	int8_t minExponent;
	uint8_t maxExponent;
	int8_t exponent;
	bool sign;
	float flRepNumber;
	int32_t mantissa;


};

struct flPointNumDouble {

	uint8_t base;
	uint8_t mantissaLenght;
	int16_t minExponent;
	uint16_t maxExponent;
	int32_t exponent;
	int8_t sign;
	double flRepNumber;
	uint64_t mantissa;

};

float generateFloat(uint8_t base, uint32_t mantissaLength, int8_t minExp,
		uint8_t maxExp);
double generateDouble(uint8_t base, uint64_t mantissaLength, int16_t minExp,
		uint16_t maxExp);

#endif /* FLOATINGGEN_H_ */
